package ken.spring.cloud.alibaba;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;


/**
 * <ul>
 * <li>Title: SentinelDemoApplication</li>
 * <li>Description: TODO </li>
 * </ul>
 *
 * @author swc
 * @date 2022-06-21 19:42
 */
@SpringBootApplication
@EnableFeignClients
//#消费者不需要向注册中心注册
@EnableDiscoveryClient(autoRegister=false)
public class SentinelFeignApplication {

    public static void main(String[] args) {
        //initFlowQpsRule();
        SpringApplication.run(SentinelFeignApplication.class);
    }


  /*  private static void initFlowQpsRule() {
        List<FlowRule> rules = new ArrayList<FlowRule>();
        FlowRule rule1 = new FlowRule();
        rule1.setResource("hello");
        // set limit qps to 20
        rule1.setCount(2);
        rule1.setGrade(RuleConstant.FLOW_GRADE_QPS);
        rule1.setLimitApp("default");
        rules.add(rule1);
        FlowRuleManager.loadRules(rules);
    }*/

}
